/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mvp.levelup.generics;

import java.util.TreeSet;

/**
 *
 * @author WORKSPOT2
 */
public class Parcel<T extends Comparable>
{

    private TreeSet<T> page;
    private int totalCount;
    private Class<T> entityClass;

    public Parcel(int totalCount,Class<T> entityClass)
    {
        this.totalCount = totalCount;
        this.page = new TreeSet<T>();
        this.entityClass = entityClass;
    }

    public TreeSet<T> getPage()
    {
        return page;
    }

    public void addEntity(T element)
    {
        page.add(element);
    }

    public int getTotalCount()
    {
        return totalCount;
    }
}
